package com.saydc.actions.incorporaciones;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.saydc.dao.ExpertiseDAO;
import com.saydc.dao.PuestosDAO;
import com.saydc.model.Expertise;
import com.saydc.model.Puesto;

public class CargaIncorporacionAction extends Action {
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		
		PuestosDAO puestosDao = PuestosDAO.getInstance();
		List<Puesto> listaPuestos = puestosDao.getPuestosEspecificos();
		ExpertiseDAO expertiseDao = ExpertiseDAO.getInstance();
		List<Expertise> listaExpertises = expertiseDao.getExpertises();
		request.getSession().setAttribute("listaPuestos", listaPuestos);
		request.getSession().setAttribute("listaExpertises", listaExpertises);
		return mapping.findForward("incorporacionEmpleado");
	}

}
